﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Server
{
    class Program
    {
        static void Main(string[] args)
        {
            //TcpServer s = new TcpServer();
            GameServer s = new GameServer();
            s.AcceptConnection += s_AcceptConnection;
            s.ClientInput += s_ClientInput;
            s.ClientDisconnected += s_ClientDisconnected;
            s.SocketError += s_SocketError;
            s.Start();
        }

        static void s_SocketError(object sender, ServerErrorArgs e)
        {
            Console.WriteLine("Socket Error: {0}", e.Error.Message);
        }

        static void s_ClientDisconnected(object sender, ServerEventArgs e)
        {
            Console.WriteLine("Client Disconnected");
        }

        static void s_ClientInput(object sender, ServerInputArgs e)
        {
            Console.WriteLine("Received Client Input: {0}", e.Message);
        }

        static void s_AcceptConnection(object sender, ServerEventArgs e)
        {
            Console.WriteLine("Accepting Connection");
        }
    }
}
